import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import PubSub from 'pubsub-js'
import * as myUtils from '@/utils/utils'
import ElementUI from 'element-ui'
import less from 'less'
import * as mutationsTypes from '@/store/mutations-types'
import snCommon from "@/components/common/sn/snCommon";
import VueLazyload from 'vue-lazyload'

import * as http from '@/network/request'

Vue.config.productionTip = false;

//挂在全局
// axios请求方法
Vue.prototype.$http = http.request
Vue.prototype.$http.adornParams = http.adornParams
Vue.prototype.$http.adornData = http.adornData
//组件发布订阅消息
Vue.prototype.PubSub = PubSub
//注册到vue中 任何一个vue组件都可以使用
Vue.prototype.myUtils = myUtils
//引入element ui
Vue.use(ElementUI)
//引入less
Vue.use(less)
//导入mutations-types  mutations中方法的名字
Vue.prototype.mutationsTypes = mutationsTypes
//导入自定义全局组件
Vue.use(snCommon)
//懒加载
Vue.use(VueLazyload)
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')


